package com.bawei.park
import androidx.lifecycle.lifecycleScope
import androidx.recyclerview.widget.LinearLayoutManager
import com.alibaba.android.arouter.facade.annotation.Route
import com.bawei.base.mvvm.BaseActivity
import com.bawei.park.databinding.ActivityParkBinding
import dagger.hilt.android.AndroidEntryPoint

import kotlinx.coroutines.launch
@AndroidEntryPoint
@Route(path = "/park/ParkActivity")
class ParkActivity : BaseActivity<ActivityParkBinding,ParkViewModel>() {
        lateinit var adapter:ParkAdapter
    override fun initView() {
        adapter= ParkAdapter()
        lifecycleScope.launch {
            viewModel.getNewsList().collect(){
                adapter.submitData(it)
            }
        }
        binding.rec.adapter=adapter
        binding.rec.layoutManager=LinearLayoutManager(this)
    }

    override fun initData() {

    }
}